<?php

/* @var $this yii\web\View */

use yii\helpers\Html;
use yii\helpers\Url;
$session = Yii::$app->session;
$session->open();
?>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Foo Tables | Nifty - Admin Template</title>


    <!--STYLESHEET-->
    <!--=================================================-->

    <!--Open Sans Font [ OPTIONAL ]-->
    <link href='/thirdparty/googlefonts/OpenSans.css' rel='stylesheet' type='text/css'>


    <!--Bootstrap Stylesheet [ REQUIRED ]-->
    <link href="/thirdparty/nifty/css/bootstrap.min.css" rel="stylesheet">


    <!--Nifty Stylesheet [ REQUIRED ]-->
    <link href="/thirdparty/nifty/css/nifty.min.css" rel="stylesheet">


    <!--Nifty Premium Icon [ DEMONSTRATION ]-->
    <link href="/thirdparty/nifty/css/demo/nifty-demo-icons.min.css" rel="stylesheet">


    <!--Demo [ DEMONSTRATION ]-->
    <link href="/thirdparty/nifty/css/demo/nifty-demo.min.css" rel="stylesheet">


        
    <!--FooTable [ OPTIONAL ]-->
    <link href="/thirdparty/nifty/plugins/fooTable/css/footable.core.css" rel="stylesheet">





    
    <!--JAVASCRIPT-->
    <!--=================================================-->

    <!--Pace - Page Load Progress Par [OPTIONAL]-->
    <link href="/thirdparty/nifty/plugins/pace/pace.min.css" rel="stylesheet">
    <script src="/thirdparty/nifty/plugins/pace/pace.min.js"></script>


    <!--jQuery [ REQUIRED ]-->
    <script src="/thirdparty/nifty/js/jquery-2.2.4.min.js"></script>


    <!--BootstrapJS [ RECOMMENDED ]-->
    <script src="/thirdparty/nifty/js/bootstrap.min.js"></script>


    <!--NiftyJS [ RECOMMENDED ]-->
    <script src="/thirdparty/nifty/js/nifty.min.js"></script>






    <!--=================================================-->
    
    <!--Demo script [ DEMONSTRATION ]-->
    <script src="/thirdparty/nifty/js/demo/nifty-demo.min.js"></script>

    
    <!--FooTable [ OPTIONAL ]-->
    <script src="/thirdparty/nifty/plugins/fooTable/dist/footable.all.min.js"></script>


    <!--FooTable Example [ SAMPLE ]-->
    <script src="/thirdparty/nifty/js/demo/tables-footable.js"></script>




    

        

</head>
<div class="row" >
    <div class="col-lg-11" style="margin-left:60px;margin-top:20px;">
        <div class="panel">
            <div class="panel-heading">
                <h3 class="panel-title">
                    <span style="float:right;">
                        <a href= <?= url ::to(['daily']) ?> style = 'color:#2B425B;' >我的日报</a>&nbsp;&nbsp;
                        你好 <?= $session['realname'] ?> &nbsp;&nbsp;&nbsp;&nbsp;
                        <a href= <?= url ::to(['pass']) ?> >修改密码</a> | 
                        <a href= <?= url ::to(['quit']) ?> >注销</a>
                    </span>    
                    历史日报
                    
                </h3>
            </div>

            <!-- Foo Table - Pagination -->
            <!--===================================================-->
            <div class="panel-body">
                <label class="form-inline">显示
                    <select id="demo-show-entries" class="form-control input-sm">
                        <option value="5">5</option>
                        <option value="10">10</option>
                        <option value="15">15</option>
                        <option value="20">20</option>
                    </select>
                    记录
                </label>
                <a href="<?= url ::to(['home/index/update?id=']).time()?>">编辑当天日报</a>
                <table id="demo-foo-pagination" class="table toggle-arrow-tiny" data-page-size="5">
                    <thead>
                        <tr>
                            <th data-toggle="true">日报时间</th>
                            <th>发报时间</th>
                            <th data-hide="all">工作记录</th>
                            <th data-hide="all">总结心得</th>
                            <th data-hide="all">明日计划</th>
                        </tr>
                    </thead>
                    <tbody>
            
                        <?php foreach ($query as $row): ?>
                            <tr>
                                <td><?= date('Y-m-d', Html::encode("{$row['daily_date']}")) ?></td>
                                <td><?= date('Y-m-d', Html::encode("{$row['ctime']}")) ?></td>
                                <td><?= Html::encode("{$row['record']}") ?></td>
                                <td><?= Html::encode("{$row['conclusion']}") ?></td>
                                <td><?= Html::encode("{$row['plan']}") ?></td>
                            </tr>
                        <?php endforeach; ?>
                    </tbody>
                    <tfoot>
                        <tr>
                            <td colspan="5">
                                <div class="text-right">
                                    <ul class="pagination"></ul>
                                </div>
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </div>
            <!--===================================================-->
            <!-- End Foo Table - Pagination -->
        </div>


        <div class="panel">
            <div class="panel-body">
                <table id="demo-foo-accordion" class="table toggle-arrow-tiny">
                    <thead>
                        <tr>
                            <td style="color:red" data-toggle="true"></td>
                            <th data-hide="all">员工姓名</th>          
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>点击查看他人日报</td>
                            <td>
                                <?php foreach ($check as $row): ?>
                                    &nbsp;<a href= <?= url ::to([ 'listdaily', 'id' => "{$row['uid']}" ]) ?> > <?= Html::encode("{$row['realname']}") ?> </a>&nbsp;
                                <?php endforeach; ?>
                            </td>
                        
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>   